package com.exam.demo.mapreduce;

import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

/**
 * @author SongYueSheng
 * @date 2024/6/7 14:28
 */
public class FixTemperatureReducer extends Reducer<Text, Text, Text, Text> {
    public void reduce(Text key, Iterable<IntWritable> values, Context context) throws IOException, InterruptedException {
        int sum = 0;
        for (IntWritable val : values) {
            context.write(key, (Text) values);
        }
    }
}
